﻿<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>北京 - 会员登录 - 锐车</title>
	<meta content="锐车" name="keywords" />
	<meta content="锐车" name="description" />
	<link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
	<link rel="stylesheet" type="text/css" href="__STATIC__/home/Css/style.css">
	<script type="text/javascript" src="__STATIC__/home/Scripts/jquery.js"></script>
	<script type="text/javascript" src="__STATIC__/layui/layui.js"></script>
	<script type="text/javascript" src="__STATIC__/home/Scripts/common.js"></script>
	</head>
	<body class="loginbg">
	<div class="loginhead">
		<div class="loginheadbox layui-clear">
			<div class="logo">
				<a href="/"><img src="__STATIC__/home/Picture/20181210160709_66796.png"></a>
			</div>
			<div class="logintext">
				还没有锐车账号？&nbsp;&nbsp;<a href="{:url('home/home/register')}" target="_blank" style="color:#f60;">立即注册</a>
			</div>
		</div>
	</div>
	<div class="layui-container">
		<div class="login_main">
		<div class="title">登录锐车</div>
			<div class="mt20">
				<form name="loginform" id="loginform" class="layui-form layui-form-pane" method="post" action="/index.php?m=login">
					<div class="layui-form-item">
						<div class="layui-col-md6 layui-col-md-offset3">
							<input type="text" class="layui-input" placeholder="请输入用户名" name="username" lay-verify="required"/> 
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-col-md6 layui-col-md-offset3">
							<input type="password" placeholder="请输入密码" class="layui-input" name="pwd" lay-verify="required"/>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-col-md6 layui-col-md-offset3">
							<input type="submit" value="登 录" class="layui-btn  layui-btn-danger layui-btn-fluid" lay-submit="">
							<input type="hidden" name="a" value="login">
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-col-md4 layui-col-md-offset3">
							&nbsp;
						</div>
						<div class="layui-col-md2" style="text-align:right;">
							<a href="/forgetpwd/" style="color:#f60;">忘记密码？</a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div class="logincopyright">
		Copyright  2015 锐车 版权所有. 锐车11111
	</div>

	<script type="text/javascript">
		layui.use(['form','layer'], function(){ 
			var form = layui.form;
			var layer = layui.layer;
			

			$('.layui-form').submit(function(e)
		      {
		        e.preventDefault();

		        var index = parent.layer.getFrameIndex(window.name);
		        $.ajax({
		              type:'post',
		              url:"{:url('home/Home/login')}",
		              //form中所有值全传
		              data:$('form').serialize(),
		              datatype:'json',
		              success:function(result)
		              {
		                  if(result.code==1)
		                  {
		                      layer.msg(result.msg,{icon:1,time:1000},function()
		                      {
		                      	  //成功后跳转主页
		                      	  window.location.href="{:url('home/Home/index')}";
		                      });
		                  }
		                  else
		                  {
		                      layer.msg(result.msg,{icon:2,time:1000},function()
		                      {
		                          
		                      });
		                  }
		              }
		          })
		        })


		});
	</script>
	</body>
</html>
